#ifndef GAME_OPTIONS_H
#define GAME_OPTIONS_H

enum DifficultyLevel 
{
    EASY,
    MEDIUM,
    HARD
};

struct Options
{
    DifficultyLevel m_difficulty;
    float m_musicLevel;
    float m_sfxLevel;

    Options(void) :
        m_difficulty(MEDIUM),
        m_musicLevel(0.5f),
        m_sfxLevel(1.0f)
    {}

    Options(const DifficultyLevel difficulty, const float music, const float sfx) :
        m_difficulty(difficulty),
        m_musicLevel(music),
        m_sfxLevel(sfx)
    {}

};

class GameOptions
{
public:
    // Constructors and destructors
    virtual ~GameOptions(void);

    static GameOptions* getOptions(void);

    // Getters
    DifficultyLevel difficulty(void) const { return m_options.m_difficulty; }
    float musicLevel(void) const { return m_options.m_musicLevel; }
    float sfxLevel(void) const { return m_options.m_sfxLevel; }

    // Setters
    void setOptions(const Options& opt) { m_options = opt; }
    void setDifficulty(const DifficultyLevel difficulty) { m_options.m_difficulty = difficulty; }
    void setMusicLevel(const float level) { m_options.m_musicLevel = level; }
    void setSfxLevel(const float level) { m_options.m_sfxLevel = level; }

    // Assignment operator
    GameOptions& operator=(const GameOptions& opt);

private:
    static GameOptions* m_generalOptions;
    Options m_options;

    GameOptions(void);
};

#endif
